import Storage from 'good-storage'
import {USER_INFO_KEY} from 'common/js/config'

export function saveUserInfo(val) {
  Storage.set(USER_INFO_KEY, val)
  return val
}

export function clearUserInfo() {
  Storage.remove(USER_INFO_KEY)
  return {}
}

export function loadUserInfo() {
  return Storage.get(USER_INFO_KEY, {})
}
